// 变更查询
function getChangeHistoryManagePanel(t) {return new CMS.ChangeHistoryManagePanel(t)};
var CHANGE_HISTORY_MANAGE_PANEL;
CMS.ChangeHistoryManagePanel = function(title) {
	CHANGE_HISTORY_MANAGE_PANEL = this;
	var objArr = converArr([
		{name:'id' , width:50 , sortable:true , header:'ECR编号'},
		{name:'evaDate' , width:140 , sortable:true , header:'受理时间'} ,
	    {name:'productName' , width:120 , header:'适用产品'},
		{name:'project' , width:120 , header:'工程'},
		{name:'applierUserName' , width:120 , header:'申请人'},
		{name:'reasonDesc' , width:120 , header:'变更内容'},
	    {name:'notificationId' , width:50 , header:'ECN编号'},
		{name:'mustAlertCustomerString' , width:80 , header:'是否通报客户'},
		{name:'deployChangeDate' , width:120 , header:'实施时间'},
		{name:'evaDeptMgrName' , width:120 , sortable:true , header:'批准人'},
		{name:'productSerialNumber',hidden:true} , 
		{name:'emergencyString',hidden:true} , 
		{name:'changeType',hidden:true} , 
		{name:'changeTypeName',hidden:true} , 
		{name:'level',hidden:true},
		{name:'effective',hidden:true} , 
		{name:'effectiveStartDate',hidden:true} , 		
		{name:'effectiveEndDate',hidden:true} , 
		{name:'effectiveString',hidden:true},
		{name:'reasonString',hidden:true},
		{name:'supportAccordance',hidden:true},
		{name:'appliedDeptId',hidden:true},
		{name:'appliedDeptName',hidden:true},
		{name:'verifyRuleDocUrl',hidden:true},
		{name:'evaDeptId',hidden:true},
		{name:'approvedMgrId',hidden:true},
		{name:'approvedMgrName',hidden:true},
		{name:'approvedDate',hidden:true},
		{name:'beforeChangeStatus',hidden:true},
		{name:'afterChangeStatus',hidden:true},
		
		{name:'evaImpactForReliability',hidden:true},
		{name:'evaImpactForReliabilityString',hidden:true},
		{name:'evaImpactForProductHandle',hidden:true},
		{name:'evaImpactForProductHandleString',hidden:true},
		{name:'evaImpactForProduceEfficiency',hidden:true},
		{name:'mustVerify',hidden:true},
		{name:'mustVerifyString',hidden:true},
		{name:'mustAlertCustomer',hidden:true},
		{name:'mustAlertCustomerString',hidden:true},
		{name:'mustSpplierChange',hidden:true},
		{name:'mustSpplierChangeString',hidden:true},
		{name:'productTreatmentAdvise',hidden:true},
		{name:'result',hidden:true},
		{name:'resultString',hidden:true},
		{name:'evaComments',hidden:true},
		{name:'evaLeader',hidden:true},
		{name:'evaLeaderName',hidden:true},
		{name:'evaDeptMgrId',hidden:true},
		{name:'evaDeptMgrName',hidden:true},
		{name:'evaDeptId',hidden:true},
		{name:'evaDeptName',hidden:true},
		{name:'evaDate',hidden:true},
		{name:'resultReportUrl',hidden:true},
		
		{name:'sampleReportURL',hidden:true},
		{name:'sampleIsQualified',hidden:true},
		{name:'sampleIsQualifiedString',hidden:true},
		{name:'smallReportURL',hidden:true},
		{name:'smallIsQualified',hidden:true},
		{name:'smallIsQualifiedString',hidden:true},
		{name:'middleReportURL',hidden:true},
		{name:'middleIsQualified',hidden:true},
		{name:'middleIsQualifiedString',hidden:true},
		{name:'isFinishedAlertCustomer',hidden:true},
		{name:'isFinishedAlertCustomerString',hidden:true},
		{name:'alertCustomerNumber',hidden:true},
		{name:'isFinishedSupChange',hidden:true},
		{name:'isFinishedSupChangeString',hidden:true},
		{name:'finishedSupChangeNumber',hidden:true},
		{name:'isFinishedSecurity',hidden:true},
		{name:'isFinishedSecurityString',hidden:true},
		{name:'attachmentForAlert',hidden:true},
		{name:'other',hidden:true},
		{name:'changeResultIsQualify',hidden:true},
		{name:'changeResultIsQualifyString',hidden:true},
		{name:'isApproveChange',hidden:true},
		{name:'isApproveChangeString',hidden:true},
		{name:'rejectReason',hidden:true},
		{name:'verifyMembers',hidden:true},
		{name:'deployChangeDate',hidden:true},
		{name:'resultReportUrl',hidden:true},
		{name:'rejectedByName',hidden:true},
		{name:'rejectedDate',hidden:true},
		{name:'rejectedReason',hidden:true},
		{name:'testPlanApprover',hidden:true},
		{name:'testPlanRejectedReason',hidden:true},
		{name:'testItemsString',hidden:true},
		
		{name:'researchDeptIsBomChanged',hidden:true},
		{name:'researchDeptIsBomChangedString',hidden:true},
		{name:'researchDeptIsDrawingChnaged',hidden:true},
		{name:'researchDeptIsDrawingChnagedString',hidden:true},
		{name:'researchDeptIsDesignDocChanged',hidden:true},
		{name:'researchDeptIsDesignDocChangedString',hidden:true},
		{name:'researchDeptFinishedDate',hidden:true},
		{name:'researchDeptUserId',hidden:true},
		{name:'researchDeptUserName',hidden:true},
		{name:'researchDeptAttachment',hidden:true},
		{name:'engineeringDeptIsBomChanged',hidden:true},
		{name:'engineeringDeptIsBomChangedString',hidden:true},
		{name:'engineeringDeptIsSopChanged',hidden:true},
		{name:'engineeringDeptIsSopChangedString',hidden:true},
		{name:'engineeringDeptIsMoldChanged',hidden:true},
		{name:'engineeringDeptIsMoldChangedString',hidden:true},
		{name:'engineeringDeptIsProcChanged',hidden:true},
		{name:'engineeringDeptIsProcChangedString',hidden:true},
		{name:'engineeringDeptIsQcChanged',hidden:true},
		{name:'engineeringDeptIsQcChangedString',hidden:true},
		{name:'engineeringDeptFinishedDate',hidden:true},
		{name:'engineeringDeptUserId',hidden:true},
		{name:'engineeringDeptUserName',hidden:true},
		{name:'engineeringDeptAttachment',hidden:true},
		{name:'qualityDeptIsInspectDocChanged',hidden:true},
		{name:'qualityDeptIsInspectDocChangedString',hidden:true},
		{name:'qualityDpetIsTrained',hidden:true},
		{name:'qualityDpetIsTrainedString',hidden:true},
		{name:'qualityDpetIsUpgradeInspection',hidden:true},
		{name:'qualityDpetIsUpgradeInspectionString',hidden:true},
		{name:'qualityDeptIsMarkInFirst3',hidden:true},
		{name:'qualityDeptIsMarkInFirst3String',hidden:true},
		{name:'qualityDeptFinishedDate',hidden:true},
		{name:'qualityDeptUserId',hidden:true},
		{name:'qualityDeptUserName',hidden:true},
		{name:'qualityDeptAttachment',hidden:true},
		{name:'productDeptIsMaterialChecked',hidden:true},
		{name:'productDeptIsMaterialCheckedString',hidden:true},
		{name:'productDeptIsTrained',hidden:true},
		{name:'productDeptIsTrainedString',hidden:true},
		{name:'productDeptIsRegisted',hidden:true},
		{name:'productDeptIsRegistedString',hidden:true},
		{name:'productDeptFinishedDate',hidden:true},
		{name:'productDeptUserId',hidden:true},
		{name:'productDeptUserName',hidden:true},
		{name:'productDeptAttachment',hidden:true},
		{name:'summaryIsNumberBeforeChangeSup',hidden:true},
		{name:'summaryIsNumberBeforeChangeSupString',hidden:true},
		{name:'summaryNumberBeforeChangeSup',hidden:true},
		{name:'summaryDeliverDateAfterChange',hidden:true},
		{name:'summaryIsNumberBeforeChangeProd',hidden:true},
		{name:'summaryIsNumberBeforeChangeProdString',hidden:true},
		{name:'summaryNumberBeforeChangeProd',hidden:true},
		{name:'summaryIsImpactShipMent',hidden:true},
		{name:'summaryIsImpactShipMentString',hidden:true},
		{name:'summaryNewProdBatchNumber',hidden:true},
		{name:'summaryNewProdDeliverDate',hidden:true},
		{name:'summaryDeptUserId',hidden:true},
		{name:'summaryDeptUserName',hidden:true},
		{name:'summaryDeptAttachment',hidden:true},
		{name:'id',header:'操作',width:180, renderer:function(v,c,row) {
			var data = row.data;
			var ret=' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.viewDetail()">申请单详情</a>'
				+' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.viewReportDetail()">通知单详情</a>';
			return ret;
		}}
	] , true);
	var productNameSearch = getField({width:190,name:'productName'});
	var changeNumberSearch = getField({width:190,name:'id'});
	var ds = getPageDs(chg_hist_base_url + 'getChangeHistory' , 'id' , objArr);
	var pageBar = getPageBBar(20 , ds);
	CMS.ChangeHistoryManagePanel.superclass.constructor.call(this, {
		title:title,store:ds,view:getGridView('没有找到数据'),
		columns:objArr.columns,sm:getRowModel(),bbar:pageBar,
		id:'change_history_manager_panel',tbar:['-',{
			text:'变更单号：'
		},changeNumberSearch , '-',{
			text:'产品名：'
		},productNameSearch , '-',{
			text:'查询',iconCls:'searchIcon2',handler:function() {CHANGE_HISTORY_MANAGE_PANEL.refresh()}
		},'-']
	});
	this.refresh = function() {
       ds.load({params:{start:0,limit:pageBar.pageSize}});
    };
    registPageDsParams(ds , [changeNumberSearch,productNameSearch] , CHANGE_HISTORY_MANAGE_PANEL.refresh);
    CHANGE_HISTORY_MANAGE_PANEL.refresh();
    
    // 查看申请单详情
    this.viewDetail = function(){
    	var rowObj = CHANGE_HISTORY_MANAGE_PANEL.getSelectionModel().getSelected();
    	var htmlCode = SPRNSTR + '<table class=\"table\" style=\"table-layout:fixed;word-break: break-all;word-wrap:break-word;\" width=\"100%\"><tbody><tr><td class=\"plat_table-row-over\" width=\"30%\">名称</td><td class=\"plat_table-row-over\">内容</td></tr>'
    		+ '<tr><td>适用产品</td><td>'+rowObj.data['productName']+'</td></tr>'
    		+ '<tr><td>适用型号</td><td>'+rowObj.data['productSerialNumber']+'</td></tr>'
    		+ '<tr><td>适用工程</td><td>'+rowObj.data['project']+'</td></tr>'
    		+ '<tr><td>变更紧急度状态</td><td>'+rowObj.data['emergencyString']+'</td></tr>'
    		+ '<tr><td>变更类别</td><td>'+rowObj.data['changeTypeName']+'</td></tr>'
    		+ '<tr><td>变更等级</td><td>'+rowObj.data['level']+'</td></tr>'
    		+ '<tr><td>变更时效</td><td>'+rowObj.data['effectiveString']+'</td></tr>'
    		+ '<tr><td>变更理由</td><td>'+rowObj.data['reasonString']+'</td></tr>'
    		+ '<tr><td>支撑依据</td><td>'+rowObj.data['supportAccordance']+'</td></tr>'
    		+ '<tr><td>变更原因简述</td><td>'+rowObj.data['reasonDesc']+'</td></tr>'
    		+ '<tr><td>变更前状态</td><td>'+rowObj.data['beforeChangeStatus']+'</td></tr>'
    		+ '<tr><td>变更后状态</td><td>'+rowObj.data['afterChangeStatus']+'</td></tr>'
    		+ '<tr><td>申请部门</td><td>'+rowObj.data['appliedDeptName']+'</td></tr>'
    		+ '<tr><td>申请人员</td><td>'+rowObj.data['applierUserName']+'</td></tr>'
    		+ '<tr><td>批准领导</td><td>'+rowObj.data['approvedMgrName']+'</td></tr>'
    		+ '<tr><td>批准时间</td><td>'+rowObj.data['approvedDate']+'</td></tr>'
    		+ '<tr><td>拒绝人</td><td>'+rowObj.data['rejectedByName']+'</td></tr>'
    		+ '<tr><td>拒绝理由</td><td><font color=red>'+rowObj.data['rejectedReason']+'</font></td></tr>'
    		+ '<tr><td>拒绝时间</td><td>'+rowObj.data['rejectedDate']+'</td></tr>'
    		+ '<tr><td>变更实验计划拒绝理由</td><td>'+rowObj.data['testPlanRejectedReason']+'</td></tr>'
    		+ '<tr><td>产品安全、可靠性影响</td><td>'+rowObj.data['evaImpactForReliabilityString']+'</td></tr>'
    		+ '<tr><td>在产品、原物料处理风险</td><td>'+rowObj.data['evaImpactForProductHandleString']+'</td></tr>'
    		+ '<tr><td>生产效率的影响</td><td>'+rowObj.data['evaImpactForProduceEfficiency']+'</td></tr>'
    		+ '<tr><td>是否需要验证</td><td>'+rowObj.data['mustVerifyString']+'</td></tr>'
    		+ '<tr><td>是否需要通报客户</td><td>'+rowObj.data['mustAlertCustomerString']+'</td></tr>'
    		+ '<tr><td>是否需要供应商变更</td><td>'+rowObj.data['mustSpplierChangeString']+'</td></tr>'
    		+ '<tr><td>成品及原物料处理意见</td><td>'+rowObj.data['productTreatmentAdvise']+'</td></tr>'
    		+ '<tr><td>评审结论</td><td>'+rowObj.data['resultString']+'</td></tr>'
    		+ '<tr><td>评审备注</td><td>'+rowObj.data['evaComments']+'</td></tr>'
    		+ '<tr><td>评审组长</td><td>'+rowObj.data['evaLeaderName']+'</td></tr>'
    		+ '<tr><td>评审部门领导</td><td>'+rowObj.data['evaDeptMgrName']+'</td></tr>'
    		+ '<tr><td>评审部门</td><td>'+rowObj.data['evaDeptName']+'</td></tr>'
    		+ '<tr><td>评审时间</td><td>'+rowObj.data['evaDate']+'</td></tr>'
    		+ '<tr><td>实验项目</td><td>'+rowObj.data['testItemsString']+'</td></tr>'
    		+ '</tbody></table>' + EPRNSTR;
    	var btns = [{
			text:'关闭',handler:function() {
				win.close();
			}
		}];
		
    	var win = new Ext.Window({
			height:500 , width:600 , layout:'border',title:'变更申请单详情',buttonAlign:'center',items:[{
				border:false,closable:true,scripts:true,autoScroll:true,region:'center',
	            discardUrl:true,nocache:true,timeout:9000,scope:this,html:htmlCode
			}],buttons:btns
		});
		win.show();
    }
    
    var view_noti_win;
    this.viewReportDetail = function(){
    	
    	view_noti_win=this;
    	var rowObj = CHANGE_HISTORY_MANAGE_PANEL.getSelectionModel().getSelected();
	
		var sampleReportURL = rowObj.data['sampleReportURL'];
		var smallReportURL = rowObj.data['smallReportURL'];
		var middleReportURL = rowObj.data['middleReportURL'];
		
    	var htmlCode = SPRNSTR + '<table class=\"table\" style=\"table-layout:fixed;word-break: break-all;word-wrap:break-word;\" width=\"100%\"><tbody><tr><td class=\"plat_table-row-over\" width=\"30%\">名称</td><td class=\"plat_table-row-over\">内容</td></tr>'
		
		if(	sampleReportURL != ""){
			htmlCode += '<tr><td>样品验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['sampleReportURL']+'>样本测试报告</a>';
			if(login_user_name=="Admin")
				htmlCode +=' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(1,\''+sampleReportURL+'\')">修改样本测试报告</a>';
			htmlCode +='</td></tr>'
    			+ '<tr><td>样品是否合格</td><td>'+rowObj.data['sampleIsQualifiedString']+'</td></tr>';
    		
		}
    	if( smallReportURL != ""){
			htmlCode += '<tr><td>小批量验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['smallReportURL']+'>小批量测试报告</a>';
			if(login_user_name=="Admin")
				htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(2,\''+smallReportURL+'\')">修改小批量测试报告</a>';
			htmlCode +='</td></tr>'
    			+ '<tr><td>小批量是否合格</td><td>'+rowObj.data['smallIsQualifiedString']+'</td></tr>';
		}
		if(	middleReportURL != ""){
			htmlCode += '<tr><td>中批量验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['middleReportURL']+'>中批量测试报告</a>';
			if(login_user_name=="Admin")
				htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(3,\''+middleReportURL+'\')">修改中批量测试报告</a>';
			htmlCode += '</td></tr>'
    			+ '<tr><td>中批量是否合格</td><td>'+rowObj.data['middleIsQualifiedString']+'</td></tr>';
		}
		if( rowObj.data['isFinishedAlertCustomerString'] != ""){
			htmlCode += '<tr><td>客户报备是否完成</td><td>'+rowObj.data['isFinishedAlertCustomerString']+'</td></tr>'
    			+ '<tr><td>依据</td><td>'+rowObj.data['alertCustomerNumber']+'</td></tr>';
		}
		if( rowObj.data['isFinishedSupChangeString'] != ""){
			htmlCode += '<tr><td>供应商变更是否完成</td><td>'+rowObj.data['isFinishedSupChangeString']+'</td></tr>'
    			+ '<tr><td>依据</td><td>'+rowObj.data['finishedSupChangeNumber']+'</td></tr>';
		}
		if( rowObj.data['isFinishedAlertCustomerString'] != "" || rowObj.data['isFinishedSupChangeString'] != ""){
			htmlCode += '<tr><td>通报客户供应商附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['attachmentForAlert']+'>附件</a>';
			if(login_user_name=="Admin")
				htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(4,\''+rowObj.data['attachmentForAlert']+'\')">修改附件</a></td></tr>';
		}
		htmlCode += '<tr><td>安全件列名是否完成</td><td>'+rowObj.data['isFinishedSecurityString']+'</td></tr>'
    		+ '<tr><td>其他</td><td>'+rowObj.data['other']+'</td></tr>'
    		+ '<tr><td>变更验证结论是否合格</td><td>'+rowObj.data['changeResultIsQualifyString']+'</td></tr>'
    		+ '<tr><td>变更前状态</td><td>'+rowObj.data['beforeChangeStatus']+'</td></tr>'
    		+ '<tr><td>变更后状态</td><td>'+rowObj.data['afterChangeStatus']+'</td></tr>'
    		+ '<tr><td>是否同意变更</td><td>'+rowObj.data['isApproveChangeString']+'</td></tr>'
    		+ '<tr><td>拒绝理由</td><td>'+rowObj.data['rejectReason']+'</td></tr>'
    		+ '<tr><td>参评人员</td><td>'+rowObj.data['verifyMembers']+'</td></tr>'
    		+ '<tr><td>变更实施时间</td><td>'+rowObj.data['deployChangeDate']+'</td></tr>'
    		+ '<tr><td>组织部门</td><td>'+rowObj.data['evaDeptName']+'</td></tr>'
    		+ '<tr><td>组织人员</td><td>'+rowObj.data['evaLeaderName']+'</td></tr>'
    		+ '<tr><td>组织部门领导</td><td>'+rowObj.data['evaDeptMgrName']+'</td></tr>'
    		+ '<tr><td>应研所-修改设计BOM并存档</td><td>'+rowObj.data['researchDeptIsBomChangedString']+'</td></tr>'
	    	+ '<tr><td>应研所-修改设计图纸并存档</td><td>'+rowObj.data['researchDeptIsDrawingChnagedString']+'</td></tr>'
	    	+ '<tr><td>应研所-修改设计规格书并存档</td><td>'+rowObj.data['researchDeptIsDesignDocChangedString']+'</td></tr>'
	    	+ '<tr><td>应研所-完成时间</td><td>'+rowObj.data['researchDeptFinishedDate']+'</td></tr>'
	    	+'<tr><td>应研所-处理人员</td><td>'+rowObj.data['researchDeptUserName']+'</td></tr>';
	    if(rowObj.data['researchDeptAttachment']!=""){
	    	htmlCode += '<tr><td>应研所-附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['researchDeptAttachment']+'>附件</a>';
	    	if(login_user_name=="Admin")
	    		htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(5,\''+rowObj.data['researchDeptAttachment']+'\')">修改附件</a></td></tr>';
	    }else{
	    	htmlCode += '<tr><td>应研所-附件</td><td>无附件</td></tr>';
	    }
	    
	    htmlCode += '<tr><td>工程部门-修改工艺BOM并存档</td><td>'+rowObj.data['engineeringDeptIsBomChangedString']+'</td></tr>'
	    	+ '<tr><td>工程部门-修改SOP文档并存档</td><td>'+rowObj.data['engineeringDeptIsSopChangedString']+'</td></tr>'
	    	+ '<tr><td>工程部门-工模具准备或修改</td><td>'+rowObj.data['engineeringDeptIsMoldChangedString']+'</td></tr>'
	    	+ '<tr><td>工程部-程序准备</td><td>'+rowObj.data['engineeringDeptIsProcChangedString']+'</td></tr>'
	    	+ '<tr><td>工程部-修改QC工程图</td><td>'+rowObj.data['engineeringDeptIsQcChangedString']+'</td></tr>'
	    	+ '<tr><td>工程部-完成时间</td><td>'+rowObj.data['engineeringDeptFinishedDate']+'</td></tr>'
	    	+ '<tr><td>工程部-处理人员</td><td>'+rowObj.data['engineeringDeptUserName']+'</td></tr>';
	    
	    if(rowObj.data['researchDeptAttachment']!=""){
	    	htmlCode += '<tr><td>工程部-附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['engineeringDeptAttachment']+'>附件</a>';
	    	if(login_user_name=="Admin")
	    		htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(6,\''+rowObj.data['engineeringDeptAttachment']+'\')">修改附件</a></td></tr>';
	    }else{
	    	htmlCode += '<tr><td>工程部-附件</td><td>无附件</td></tr>';
	    }
	    
	    htmlCode += '<tr><td>质量部门-完成对应检验文档修改</td><td>'+rowObj.data['qualityDeptIsInspectDocChangedString']+'</td></tr>'
	    	+ '<tr><td>质量部门-完成变更培训</td><td>'+rowObj.data['qualityDpetIsTrainedString']+'</td></tr>'
	    	+ '<tr><td>质量部门-实施变更品加严检验</td><td>'+rowObj.data['qualityDpetIsUpgradeInspectionString']+'</td></tr>'
	    	+ '<tr><td>质量部门-进行前3批变更品标识</td><td>'+rowObj.data['qualityDeptIsMarkInFirst3String']+'</td></tr>'
	    	+ '<tr><td>质量部门-完成时间</td><td>'+rowObj.data['qualityDeptFinishedDate']+'</td></tr>'
	    	+ '<tr><td>质量部门-处理人员</td><td>'+rowObj.data['qualityDeptUserName']+'</td></tr>';
	    		    
	    if(rowObj.data['researchDeptAttachment']!=""){
	    	htmlCode += '<tr><td>质量部门-附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['qualityDeptAttachment']+'>附件</a>';
	    	if(login_user_name=="Admin")
	    		htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(7,\''+rowObj.data['qualityDeptAttachment']+'\')">修改附件</a></td></tr>';
	    }else{
	    	htmlCode += '<tr><td>质量部门-附件</td><td>无附件</td></tr>';
	    }
	    
	    htmlCode += '<tr><td>生产班组-生产资料齐套检查</td><td>'+rowObj.data['productDeptIsMaterialCheckedString']+'</td></tr>'
	    	+ '<tr><td>生产班组-完成变更培训</td><td>'+rowObj.data['productDeptIsTrainedString']+'</td></tr>'
	    	+ '<tr><td>生产班组-变更执行登记</td><td>'+rowObj.data['productDeptIsRegistedString']+'</td></tr>'
	    	+ '<tr><td>生产班组-完成时间</td><td>'+rowObj.data['productDeptFinishedDate']+'</td></tr>'
	    	+ '<tr><td>生产班组-处理人员</td><td>'+rowObj.data['productDeptUserName']+'</td></tr>';
	    if(rowObj.data['researchDeptAttachment']!=""){
	    	htmlCode += '<tr><td>生产班组-附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['productDeptAttachment']+'>附件</a>';
	    	if(login_user_name=="Admin")
	    		htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(8,\''+rowObj.data['productDeptAttachment']+'\')">修改附件</a></td></tr>';
	    }else{
	    	htmlCode += '<tr><td>生产班组-附件</td><td>无附件</td></tr>';
	    }
	    
	    htmlCode += '<tr><td>综合管理-变更前供应商物料是否有数量</td><td>'+rowObj.data['summaryIsNumberBeforeChangeSupString']+'</td></tr>'
	    	+ '<tr><td>综合管理-变更前供应商物料数量</td><td>'+rowObj.data['summaryNumberBeforeChangeSup']+'</td></tr>'
	    	+ '<tr><td>综合管理-变更后交付时间</td><td>'+rowObj.data['summaryDeliverDateAfterChange']+'</td></tr>'
	    	+ '<tr><td>综合管理-变更前产品、在制品是否有数量</td><td>'+rowObj.data['summaryIsNumberBeforeChangeProdString']+'</td></tr>'
	    	+ '<tr><td>综合管理-变更前产品、在制品数量</td><td>'+rowObj.data['summaryNumberBeforeChangeProd']+'</td></tr>'
	    	+ '<tr><td>综合管理-变更是否影响产品出货</td><td>'+rowObj.data['summaryIsImpactShipMentString']+'</td></tr>'
	    	+ '<tr><td>综合管理-新产品首批号</td><td>'+rowObj.data['summaryNewProdBatchNumber']+'</td></tr>'
	    	+ '<tr><td>综合管理-配送时间</td><td>'+rowObj.data['summaryNewProdDeliverDate']+'</td></tr>'
	    	+ '<tr><td>综合管理-处理人员</td><td>'+rowObj.data['summaryDeptUserName']+'</td></tr>';
	    
	    if(rowObj.data['researchDeptAttachment']!=""){
	    	htmlCode += '<tr><td>综合管理-附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['summaryDeptAttachment']+'>附件</a>';
	    	if(login_user_name=="Admin")
	    		htmlCode += ' <a href="javascript:CHANGE_HISTORY_MANAGE_PANEL.modifyAttachment(9,\''+rowObj.data['summaryDeptAttachment']+'\')">修改附件</a></td></tr>';
	    }else{
	    	htmlCode += '<tr><td>综合管理-附件</td><td>无附件</td></tr>';
	    }	
	    htmlCode += '</tbody></table>' + EPRNSTR;
    	var btns = [{
			text:'关闭',handler:function() {
				win.close();
			}
		}];
		
		
    	var win = new Ext.Window({
			height:500 , width:600 , layout:'border',title:'变更通知单详情',buttonAlign:'center',items:[{
				border:false,closable:true,scripts:true,autoScroll:true,region:'center',
	            discardUrl:true,nocache:true,timeout:9000,scope:this,html:htmlCode
			}],buttons:btns
		});
		win.show();
		
		this.closeParentWin = function(){
			win.close();
		};
		
    }
    
    this.modifyAttachment = function(type,removedFile){
    	var rowObj = CHANGE_HISTORY_MANAGE_PANEL.getSelectionModel().getSelected();
    	
    	var items = [
    		{xtype:'textfield', fieldLabel:'选择替换的文件', inputType:'file', name:'image', width:340}
    	];
    	
    	var form1 = new Ext.form.FormPanel({
			bodyStyle:'padding:5px',
	    	deferredRender:false,
	    	defaultType: 'textfield',
	    	region:'center',
	    	items:items,
	    	fileUpload:true,
	    	labelWidth:120,
	    	autoScroll:true,
	    	id:'form1'
	    });
	    	
	    var win = getEmptyPanel3([{
	    	text:'提交', 
	    	name:'submit',
	    	handler:function() {
		   		var formObj = form1.getForm();
		   		var id = rowObj.data['id'];
		   		
		   		var params = checkObjs(items,{id:id,type:type,removedFile:removedFile});
		   		
		   		formObj.submit({
		   			url:chg_hist_base_url + 'changeAttachments',
		   			params:params,
		   			waitTitle: '请稍后',
		   			waitMsg:'提交中...',
		   			success:function(form1,resp) {
				    	uploadCallBack(resp);
				    },
				    failure:function(form1,resp){
				    	uploadCallBack(resp);
				    }
		   		});
		   		var uploadCallBack = function(resp) {
			    	var obj = resp.result;
			    	showTip2('消息' , obj.msg , 3);
			    	CHANGE_HISTORY_MANAGE_PANEL.refresh();
			    	if(obj.status == '1') win.close();
			    	view_noti_win.closeParentWin();
			    };
		   	}
	    }] , '修改附件' , form1 , 100 , 600);
    }
};
Ext.extend(CMS.ChangeHistoryManagePanel, Ext.grid.GridPanel);

function getExternalChangeHistoryManagePanel(t) {return new CMS.ExternalChangeHistoryManagePanel(t)};
var EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL;
CMS.ExternalChangeHistoryManagePanel = function(title) {
	EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL = this;
	var objArr = converArr([
		{name:'id' , width:50 , sortable:true , header:'ECR编号'},
		{name:'evaDate' , width:140 , sortable:true , header:'受理时间'} ,
	    {name:'productName' , width:120 , header:'适用产品'},
		{name:'project' , width:120 , header:'工程'},
		{name:'appliedByName' , width:120 , header:'申请人'},
		{name:'changeReasonContent' , width:120 , header:'变更内容'},
	    {name:'notificationId' , width:50 , header:'ECN编号'},
		{name:'mustAlertCustomerString' , width:80 , header:'是否通报客户'},
		{name:'deployChangeDate' , width:120 , header:'实施时间'},
		{name:'evaDeptMgrName' , width:120 , sortable:true , header:'批准人'},
		{name:'supplierCode',hidden:true},
		{name:'materialCode',hidden:true},
		{name:'appliedBy',hidden:true},
		{name:'appliedByName',hidden:true},

		{name:'supplierName',hidden:true},
		{name:'materialName',hidden:true},
		{name:'materialSerialNumber',hidden:true},
		{name:'appliedDate',hidden:true},

		{name:'statusString',hidden:true},
		{name:'changeRequestedBy',hidden:true},

		{name:'changeType',hidden:true},
		{name:'changeReasonContent',hidden:true},
		{name:'beforeChangeStatus',hidden:true},
		{name:'afterChangeStatus',hidden:true},
		{name:'impactForCustomerAfterChange',hidden:true},
		{name:'externalVerifyReportURL',hidden:true},
		{name:'numberOfStorage',hidden:true},
		{name:'storageProcessAdvise',hidden:true},
		{name:'numberOfOnWay',hidden:true},
		{name:'onWayProcessAdvise',hidden:true},
		{name:'internalChangeId',hidden:true},
		{name:'evaDeptId',hidden:true},
		{name:'evaDeptName',hidden:true},
		{name:'evaDeptMgrId',hidden:true},
		{name:'evaDeptMgrName',hidden:true},
		{name:'evaLeaderId',hidden:true},
		{name:'evaLeaderName',hidden:true},
				
		{name:'productName',hidden:true},
		{name:'productSerialNumber',hidden:true},
		{name:'evaImpactForReliability',hidden:true},
		{name:'evaImpactForReliabilityString',hidden:true},
		{name:'evaImpactForProductHandle',hidden:true},
		{name:'evaImpactForProductHandleString',hidden:true},
		{name:'evaImpactForProduceEfficiency',hidden:true},
		{name:'mustVerify',hidden:true},
		{name:'mustVerifyString',hidden:true},
		{name:'mustAlertCustomer',hidden:true},
		{name:'mustAlertCustomerString',hidden:true},
		{name:'mustSpplierChange',hidden:true},
		{name:'mustSpplierChangeString',hidden:true},
		{name:'productTreatmentAdvise',hidden:true},
		{name:'result',hidden:true},
		{name:'resultString',hidden:true},
		{name:'evaComments',hidden:true},
		{name:'evaDate',hidden:true},
		{name:'resultReportUrl',hidden:true},
		
		{name:'sampleReportURL',hidden:true},
		{name:'sampleIsQualified',hidden:true},
		{name:'sampleIsQualifiedString',hidden:true},
		{name:'smallReportURL',hidden:true},
		{name:'smallIsQualified',hidden:true},
		{name:'smallIsQualifiedString',hidden:true},
		{name:'middleReportURL',hidden:true},
		{name:'middleIsQualified',hidden:true},
		{name:'middleIsQualifiedString',hidden:true},
		{name:'isFinishedAlertCustomer',hidden:true},
		{name:'isFinishedAlertCustomerString',hidden:true},
		{name:'alertCustomerNumber',hidden:true},
		{name:'isFinishedSupChange',hidden:true},
		{name:'isFinishedSupChangeString',hidden:true},
		{name:'finishedSupChangeNumber',hidden:true},
		{name:'isFinishedSecurity',hidden:true},
		{name:'isFinishedSecurityString',hidden:true},
		{name:'attachmentForAlert',hidden:true},
		{name:'other',hidden:true},
		{name:'changeResultIsQualify',hidden:true},
		{name:'changeResultIsQualifyString',hidden:true},
		{name:'isApproveChange',hidden:true},
		{name:'isApproveChangeString',hidden:true},
		{name:'rejectReason',hidden:true},
		{name:'verifyMembers',hidden:true},
		{name:'deployChangeDate',hidden:true},
		{name:'resultReportUrl',hidden:true},
		{name:'rejectedByName',hidden:true},
		{name:'rejectedDate',hidden:true},
		{name:'rejectedReason',hidden:true},
		{name:'testPlanApprover',hidden:true},
		{name:'testPlanRejectedReason',hidden:true},
		{name:'testItemsString',hidden:true},
		
		{name:'researchDeptIsBomChanged',hidden:true},
		{name:'researchDeptIsBomChangedString',hidden:true},
		{name:'researchDeptIsDrawingChnaged',hidden:true},
		{name:'researchDeptIsDrawingChnagedString',hidden:true},
		{name:'researchDeptIsDesignDocChanged',hidden:true},
		{name:'researchDeptIsDesignDocChangedString',hidden:true},
		{name:'researchDeptFinishedDate',hidden:true},
		{name:'researchDeptUserId',hidden:true},
		{name:'researchDeptUserName',hidden:true},
		{name:'researchDeptAttachment',hidden:true},
		{name:'engineeringDeptIsBomChanged',hidden:true},
		{name:'engineeringDeptIsBomChangedString',hidden:true},
		{name:'engineeringDeptIsSopChanged',hidden:true},
		{name:'engineeringDeptIsSopChangedString',hidden:true},
		{name:'engineeringDeptIsMoldChanged',hidden:true},
		{name:'engineeringDeptIsMoldChangedString',hidden:true},
		{name:'engineeringDeptIsProcChanged',hidden:true},
		{name:'engineeringDeptIsProcChangedString',hidden:true},
		{name:'engineeringDeptIsQcChanged',hidden:true},
		{name:'engineeringDeptIsQcChangedString',hidden:true},
		{name:'engineeringDeptFinishedDate',hidden:true},
		{name:'engineeringDeptUserId',hidden:true},
		{name:'engineeringDeptUserName',hidden:true},
		{name:'engineeringDeptAttachment',hidden:true},
		{name:'qualityDeptIsInspectDocChanged',hidden:true},
		{name:'qualityDeptIsInspectDocChangedString',hidden:true},
		{name:'qualityDpetIsTrained',hidden:true},
		{name:'qualityDpetIsTrainedString',hidden:true},
		{name:'qualityDpetIsUpgradeInspection',hidden:true},
		{name:'qualityDpetIsUpgradeInspectionString',hidden:true},
		{name:'qualityDeptIsMarkInFirst3',hidden:true},
		{name:'qualityDeptIsMarkInFirst3String',hidden:true},
		{name:'qualityDeptFinishedDate',hidden:true},
		{name:'qualityDeptUserId',hidden:true},
		{name:'qualityDeptUserName',hidden:true},
		{name:'qualityDeptAttachment',hidden:true},
		{name:'productDeptIsMaterialChecked',hidden:true},
		{name:'productDeptIsMaterialCheckedString',hidden:true},
		{name:'productDeptIsTrained',hidden:true},
		{name:'productDeptIsTrainedString',hidden:true},
		{name:'productDeptIsRegisted',hidden:true},
		{name:'productDeptIsRegistedString',hidden:true},
		{name:'productDeptFinishedDate',hidden:true},
		{name:'productDeptUserId',hidden:true},
		{name:'productDeptUserName',hidden:true},
		{name:'productDeptAttachment',hidden:true},
		{name:'summaryIsNumberBeforeChangeSup',hidden:true},
		{name:'summaryIsNumberBeforeChangeSupString',hidden:true},
		{name:'summaryNumberBeforeChangeSup',hidden:true},
		{name:'summaryDeliverDateAfterChange',hidden:true},
		{name:'summaryIsNumberBeforeChangeProd',hidden:true},
		{name:'summaryIsNumberBeforeChangeProdString',hidden:true},
		{name:'summaryNumberBeforeChangeProd',hidden:true},
		{name:'summaryIsImpactShipMent',hidden:true},
		{name:'summaryIsImpactShipMentString',hidden:true},
		{name:'summaryNewProdBatchNumber',hidden:true},
		{name:'summaryNewProdDeliverDate',hidden:true},
		{name:'summaryDeptUserId',hidden:true},
		{name:'summaryDeptUserName',hidden:true},
		{name:'summaryDeptAttachment',hidden:true},
		{name:'status',hidden:true},
		
		{name:'id',header:'操作',width:180, renderer:function(v,c,row) {
			var data = row.data;
			var ret=' <a href="javascript:EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.viewDetail()">申请单详情</a>'
				+' <a href="javascript:EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.viewReportDetail()">通知单详情</a>';
			return ret;
		}}
	] , true);
	var productNameSearch = getField({width:190,name:'productName'});
	var changeNumberSearch = getField({width:190,name:'id'});
	var ds = getPageDs(chg_hist_base_url + 'getExternalChangeHistory' , 'id' , objArr);
	var pageBar = getPageBBar(20 , ds);
	CMS.ExternalChangeHistoryManagePanel.superclass.constructor.call(this, {
		title:title,store:ds,view:getGridView('没有找到数据'),
		columns:objArr.columns,sm:getRowModel(),bbar:pageBar,
		id:'external_change_history_manager_panel',tbar:['-',{
			text:'变更单号：'
		},changeNumberSearch , '-',{
			text:'产品名：'
		},productNameSearch , '-',{
			text:'查询',iconCls:'searchIcon2',handler:function() {EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.refresh()}
		},'-']
	});
	this.refresh = function() {
       ds.load({params:{start:0,limit:pageBar.pageSize}});
    };
    registPageDsParams(ds , [changeNumberSearch,productNameSearch] , EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.refresh);
    EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.refresh();
    
    // 查看申请单详情
    this.viewDetail = function(){
    	var rowObj = EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.getSelectionModel().getSelected();
    	var htmlCode = SPRNSTR + '<table class=\"table\" style=\"table-layout:fixed;word-break: break-all;word-wrap:break-word;\" width=\"100%\"><tbody><tr><td class=\"plat_table-row-over\" width=\"30%\">名称</td><td class=\"plat_table-row-over\">内容</td></tr>'
    		+ '<tr><td>变更序号</td><td>'+rowObj.data['id']+'</td></tr>'
    		+ '<tr><td>供应商名称</td><td>'+rowObj.data['supplierName']+'</td></tr>'
    		+ '<tr><td>供应商代码</td><td>'+rowObj.data['supplierCode']+'</td></tr>'
    		+ '<tr><td>物料代码</td><td>'+rowObj.data['materialCode']+'</td></tr>'
    		+ '<tr><td>物料名称</td><td>'+rowObj.data['materialName']+'</td></tr>'
    		+ '<tr><td>物料类型</td><td>'+rowObj.data['materialSerialNumber']+'</td></tr>'
    		+ '<tr><td>变更申请时间</td><td>'+rowObj.data['appliedDate']+'</td></tr>'
    		+ '<tr><td>申请提交人</td><td>'+rowObj.data['appliedByName']+'</td></tr>'
    		+ '<tr><td>变更需求单位</td><td>'+rowObj.data['changeRequestedBy']+'</td></tr>'
    		+ '<tr><td>变更类型</td><td>'+rowObj.data['changeType']+'</td></tr>'
    		+ '<tr><td>变更原因及内容描述</td><td>'+rowObj.data['changeReasonContent']+'</td></tr>'
    		+ '<tr><td>变更前状态</td><td>'+rowObj.data['beforeChangeStatus']+'</td></tr>'
    		+ '<tr><td>变更后状态</td><td>'+rowObj.data['afterChangeStatus']+'</td></tr>'
    		+ '<tr><td>变更后可能存在对客户的影响</td><td>'+rowObj.data['impactForCustomerAfterChange']+'</td></tr>'
    		+ '<tr><td>客户方验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['externalVerifyReportURL']+'>附件</a></td></tr>'
    		+ '<tr><td>在库品数量</td><td>'+rowObj.data['numberOfStorage']+'</td></tr>'
    		+ '<tr><td>处理意见</td><td>'+rowObj.data['storageProcessAdvise']+'</td></tr>'
    		+ '<tr><td>在途品数量</td><td>'+rowObj.data['numberOfOnWay']+'</td></tr>'
    		+ '<tr><td>处理意见</td><td>'+rowObj.data['onWayProcessAdvise']+'</td></tr>'
    		+ '<tr><td>内部变更序号</td><td>'+rowObj.data['internalChangeId']+'</td></tr>'
    		+ '<tr><td>产品安全、可靠性影响</td><td>'+rowObj.data['evaImpactForReliabilityString']+'</td></tr>'
    		+'<tr><td>在产品、原物料处理风险</td><td>'+rowObj.data['evaImpactForProductHandleString']+'</td></tr>'
    		+'<tr><td>生产效率的影响</td><td>'+rowObj.data['evaImpactForProduceEfficiency']+'</td></tr>'
    		+'<tr><td>是否需要验证</td><td>'+rowObj.data['mustVerifyString']+'</td></tr>'
    		+'<tr><td>是否需要通报客户</td><td>'+rowObj.data['mustAlertCustomerString']+'</td></tr>'
    		+'<tr><td>是否需要供应商变更</td><td>'+rowObj.data['mustSpplierChangeString']+'</td></tr>'
    		+'<tr><td>成品及原物料处理意见</td><td>'+rowObj.data['productTreatmentAdvise']+'</td></tr>'
    		+'<tr><td>评审结论</td><td>'+rowObj.data['resultString']+'</td></tr>'
    		+'<tr><td>评审组长</td><td>'+rowObj.data['evaLeaderName']+'</td></tr>'
    		+'<tr><td>评审部门领导</td><td>'+rowObj.data['evaDeptMgrName']+'</td></tr>'
    		+'<tr><td>评审部门</td><td>'+rowObj.data['evaDeptName']+'</td></tr>'
    		+'<tr><td>评审时间</td><td>'+rowObj.data['evaDate']+'</td></tr>'
    		+'<tr><td>状态</td><td>'+rowObj.data['statusString']+'</td></tr>';
    		
    	htmlCode += '</tbody></table>' + EPRNSTR;
    	var btns = [{
			text:'关闭',handler:function() {
				win.close();
			}
		}];
		
    	var win = new Ext.Window({
			height:500 , width:600 , layout:'border',title:'变更申请单详情',buttonAlign:'center',items:[{
				border:false,closable:true,scripts:true,autoScroll:true,region:'center',
	            discardUrl:true,nocache:true,timeout:9000,scope:this,html:htmlCode
			}],buttons:btns
		});
		win.show();
    }
    
    this.viewReportDetail = function(){
    	var rowObj = EXTERNAL_CHANGE_HISTORY_MANAGE_PANEL.getSelectionModel().getSelected();
    	var sampleReportURL = rowObj.data['sampleReportURL'];
		var smallReportURL = rowObj.data['smallReportURL'];
		var middleReportURL = rowObj.data['middleReportURL'];
		
		var status = rowObj.data['status'];
				
    	var htmlCode = SPRNSTR + '<table class=\"table\" style=\"table-layout:fixed;word-break: break-all;word-wrap:break-word;\" width=\"100%\"><tbody><tr><td class=\"plat_table-row-over\" width=\"30%\">名称</td><td class=\"plat_table-row-over\">内容</td></tr>';
    	
    	htmlCode += '<tr><td>供应商名称</td><td>'+rowObj.data['supplierName']+'</td></tr>'
    			+'<tr><td>变更依据</td><td>'+rowObj.data['internalChangeId']+'</td></tr>'
    			'<tr><td>物料名称</td><td>'+rowObj.data['materialName']+'</td></tr>'
    			'<tr><td>物料型号</td><td>'+rowObj.data['materialSerialNumber']+'</td></tr>'
    			'<tr><td>供方代码</td><td>'+rowObj.data['supplierCode']+'</td></tr>'
    			'<tr><td>用于长虹产品</td><td>'+rowObj.data['productName']+'</td></tr>'
    			'<tr><td>适用型号</td><td>'+rowObj.data['productSerialNumber']+'</td></tr>';
    	if(	sampleReportURL != ""){
			htmlCode += '<tr><td>样品验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['sampleReportURL']+'>样本测试报告</a></td></tr>'
    			+ '<tr><td>样品是否合格</td><td>'+rowObj.data['sampleIsQualifiedString']+'</td></tr>';
		}
    	if( smallReportURL != ""){
			htmlCode += '<tr><td>小批量验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['smallReportURL']+'>小批量测试报告</a></td></tr>'
    			+ '<tr><td>小批量是否合格</td><td>'+rowObj.data['smallIsQualifiedString']+'</td></tr>';
		}
		if(	middleReportURL != ""){
			htmlCode += '<tr><td>中批量验证报告</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['middleReportURL']+'>中批量测试报告</a></td></tr>'
    			+ '<tr><td>中批量是否合格</td><td>'+rowObj.data['middleIsQualifiedString']+'</td></tr>';
		}
    	htmlCode += '<tr><td>客户报备是否完成</td><td>'+rowObj.data['isFinishedAlertCustomerString']+'</td></tr>'
    		+ '<tr><td>依据</td><td>'+rowObj.data['alertCustomerNumber']+'</td></tr>'
    		+ '<tr><td>供应商变更是否完成</td><td>'+rowObj.data['isFinishedSupChangeString']+'</td></tr>'
    		+ '<tr><td>依据</td><td>'+rowObj.data['finishedSupChangeNumber']+'</td></tr>'
    	 	+ '<tr><td>通报客户供应商附件</td><td><a href='+chg_base_url+'viewDocument?docUrl='+rowObj.data['attachmentForAlert']+'>附件</a></td></tr>'
    	 	+ '<tr><td>安全件列名是否完成</td><td>'+rowObj.data['isFinishedSecurityString']+'</td></tr>'
    		+ '<tr><td>其他</td><td>'+rowObj.data['other']+'</td></tr>'
    		+ '<tr><td>变更验证结论是否合格</td><td>'+rowObj.data['changeResultIsQualifyString']+'</td></tr>'
    		+ '<tr><td>变更前状态</td><td>'+rowObj.data['beforeChangeStatus']+'</td></tr>'
    		+ '<tr><td>变更后状态</td><td>'+rowObj.data['afterChangeStatus']+'</td></tr>'
    		+ '<tr><td>是否同意变更</td><td>'+rowObj.data['isApproveChangeString']+'</td></tr>'
    		+ '<tr><td>拒绝理由</td><td>'+rowObj.data['rejectReason']+'</td></tr>'
    		+ '<tr><td>参评人员</td><td>'+rowObj.data['verifyMembers']+'</td></tr>'
    		+ '<tr><td>变更实施时间</td><td>'+rowObj.data['deployChangeDate']+'</td></tr>'
    		+ '<tr><td>组织部门</td><td>'+rowObj.data['evaDeptName']+'</td></tr>'
    		+ '<tr><td>组织人员</td><td>'+rowObj.data['evaLeaderName']+'</td></tr>'
    		+ '<tr><td>组织部门领导</td><td>'+rowObj.data['evaDeptMgrName']+'</td></tr>';
    		    		
    	htmlCode += '</tbody></table>' + EPRNSTR;
    	var btns = [{
			text:'关闭',handler:function() {
				win.close();
			}
		}];
		
    	var win = new Ext.Window({
			height:500 , width:600 , layout:'border',title:'变更通知',buttonAlign:'center',items:[{
				border:false,closable:true,scripts:true,autoScroll:true,region:'center',
	            discardUrl:true,nocache:true,timeout:9000,scope:this,html:htmlCode
			}],buttons:btns
		});
		win.show();
    }
    
};
Ext.extend(CMS.ExternalChangeHistoryManagePanel, Ext.grid.GridPanel);